const userToken = 'userToken'
const userRefreshToken = 'userRefreshToken'

//存取token--->本地缓存
export function getUserToken() {
    return uni.getStorageSync(userToken)
}
  
export function setUserToken(info) {
    try {
        return uni.setStorageSync(userToken, info)
    } catch (e) {
        return this.setstorage(userToken, info)
    }
}
export function removeUserToken() {
    return uni.removeStorageSync(userToken)
}



//存取刷新token--->本地缓存
export function getUserRefreshToken() {
  return uni.getStorageSync(userRefreshToken)
}

export function setUserRefreshToken(info) {
  try {
      return uni.setStorageSync(userRefreshToken, info)
  } catch (e) {
      return this.setstorage(userRefreshToken, info)
  }
}
export function removeUserRefreshToken() {
  return uni.removeStorageSync(userRefreshToken)
}